/**
 * 产品相册图片上传
 */
var productu;
//$(function() {					
var pssettings = {
	flash_url : "js/uploader/swfupload.swf",
	upload_url: "index.php?app=system&ctl=uploader&act=add&ajax=1",
	post_params: {"UESID" : getCookie("UESID"), 'upload_app': 'product', 'upload_type ': 'photo'}, // json格式
	file_size_limit : "500 K",
	file_types : "*.jpg;*.gif;*.png",		
	file_types_description : "图片",
	file_upload_limit : 24,
	file_queue_limit : 0,
	file_post_name : 'file',
	custom_settings : { progressTarget : "photoUploadProgress"},
	
	debug: false,

	// Button settings
	button_image_url: "js/uploader/images/add.gif",
	button_width: 80,
	button_height: 17,
	button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
	button_cursor: SWFUpload.CURSOR.HAND,
	button_placeholder_id: "divAddPhotos",
	button_text: '<span class="theFont">上传图片</span>',
	button_text_style: ".theFont {color:#006699; }",
	button_text_left_padding: 20,
	button_text_top_padding: 0,
	
	// The event handler functions are defined in handlers.js
	file_queued_handler : fileQueued,
	file_queue_error_handler : fileQueueError,
	file_dialog_complete_handler : fileDialogComplete,
	upload_start_handler : uploadStart,
	upload_progress_handler : uploadProgress,
	upload_error_handler : uploadError,
	upload_success_handler : photoUploadFinishHandler,
	upload_complete_handler : uploadComplete,
	queue_complete_handler : queueComplete
};

productu = new SWFUpload(pssettings);

function photoUploadFinishHandler(file, r) {
	alert(file);
	alert(r);
}